#include <iostream>
#include <string>
#include <cstdlib>
#include <memory>
#include "Log.hpp"
#include "UdpServer.hpp"

void Usage(const std::string& proc)
{
    std::cout << "Usage:\n\t" << proc << "server_port\n"; 
}

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(0);
    }

    EnableScreen();
    uint16_t port = std::stoi(argv[1]);

    std::unique_ptr<UdpServer> us = std::make_unique<UdpServer>(port);
    
    us->InitServer();
    us->Start();

    return 0;
}